/* Making minimal use of classes to avoid class collision issues and specificity problems */

.header {
    height: 5.5rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    padding-inline: 5rem;
    border-bottom: solid 1px #138601;
    position: sticky;
    top: 0;
    transition: background 0.3s;
    z-index: 99;
    background-color:hsl(230, 61%, 88%);
    
}

.header-nav {
    display: flex;
    gap: 1.625rem;
    /*gap provided in the design*/
}

.header-nav .header-nav-link {
    color: #212521;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.header-nav .header-nav-link:hover {
    color:#194b88;
    background-color: rgba(19, 134, 1, 0.1);
}

.header-nav .header-nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #194b88;
    width: 100%;
    height: 0.25rem;
    border-radius: 0.375rem;
}

.header .header-nav-links {
    display: flex;
    gap: 0rem 1rem;
}

.header .header-nav-logo {
    display: flex;
    gap: 2rem;
}

.header-nav .header-nav-link.active {
    color: #194b88;
}

.header-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2.125rem;
    left: 0;
    /*background-color: #138601;*/
    width: 100%;
    height: 0.25rem;
    border-radius: 0.375rem;
}

.header.scrolled {
    background-color: #ffffff;
}

button.header-toggle {
    display: none;
}

@media screen and (max-width: 1280px) {
    .header {
        padding-inline: 3rem;
    }
}

@media screen and (max-width: 1024px) {
    .header {
        padding-inline: 4rem;
    }

    button.header-toggle {
        display: block;
    }

    button.header-toggle svg {
        width: 1.3rem;
        height: auto;
    }

    .header-nav .header-nav-links {
        flex-direction: column;
        opacity: 0;
        transition: opacity .3s ease-in-out;
        gap: 1rem 0rem;
    }

    .header-nav .header-nav-link {
        padding: 0.75rem 1rem;
    }

    .header .header-nav {
        position: fixed;
        right: 0;
        left: 0;
        background: white;
        width: 100%;
        top: 5.5rem;
        padding: 2rem;
        z-index: 4;
        overflow: hidden;
        transform: scaleY(0);
        transform-origin: top;
        transition: transform .3s .3s ease-in-out;
        box-shadow: 0px 5px 30px -15px rgba(26, 21, 21, 0.548);
    }

    .header .header-nav.active {
        transform: scaleY(1);
        transition: transform .3s ease-in-out;
    }

    .header .header-nav.active .header-nav-links {
        opacity: 1;
        transition: opacity .3s .3s ease-in-out;
    }

    .header .header-nav a.active::after {
        display: none;
    }

    .header-nav-logo img:first-child {
        width: 5rem;
    }

    .header-nav-logo img:last-child {
        width: 3rem;
    }
}

@media screen and (max-width: 640px) {
    .header .header-nav-logo {
        gap: 1rem;
    }

    .header-nav-logo img:first-child {
        width: 4rem;
    }

    .header-nav-logo img:last-child {
        width: 2rem;
    }

    .header {
        padding-inline: 2rem;
    }
}